﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BusinessObjects
{
    public class BaseObject : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        // Fields...
        private int _Oid = -1;

        public int Oid
        {
            get { return _Oid; }
            set
            {
                if (_Oid == value)
                    return;
                _Oid = value;
                OnPropertyChanged("Oid");
            }
        }
        
        protected void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(property));
        }
    }
}